<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            color: rgb(255,0,0);
            background-color:rgb(0,0,0);
            width: 600px;
            height: 300px;
            text-align: center;
        }
        
        .div{
            background-color: blue;
            width: 100px;
            height: 100px;
         
           
        }
         
    </style>
</head>

<body>
    <div>
           <div class="div">这是一个div元素</div>
    </div>
</body>
</html>